/* 基础布局调整 */
.fitting-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}



/* 主内容区域优化 */
.virtual-fitting {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
  width: 100%;
  box-sizing: border-box;
}

/* 面板卡片统一样式 */
.panel-section {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 400px;
}

.panel-section:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 标题样式优化 */
.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 1.25rem;
  background: #0ea5e9;
  border-radius: 2px;
}

/* 衣橱搜索区域 */
.wardrobe-search {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* 衣物网格布局优化 */
.clothes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
  justify-items: center;
  min-height: 320px;
}

.clothes-grid::-webkit-scrollbar {
  width: 6px;
}

.clothes-grid::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 3px;
}

.clothes-grid::-webkit-scrollbar-track {
  background-color: #f1f5f9;
}

/* 衣物卡片样式优化 */
.clothes-item {
  width: 100%;
  max-width: 180px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}

.clothes-image {
  width: 100%;
  height: 140px;
  object-fit: contain;
  transition: all 0.3s ease;
  background-color: #f8fafc;
  padding: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.clothes-info {
  padding: 0.5rem;
  background: white;
  text-align: center;
}

.clothes-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.clothes-type {
  font-size: 0.75rem;
  color: #64748b;
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: #f1f5f9;
  border-radius: 4px;
}

.clothes-item.selected {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

.clothes-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #0ea5e9;
}

.clothes-selected {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  background: #0ea5e9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

/* 上传区域优化 */
.upload-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.upload-area-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.upload-area-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #1e293b;
  font-weight: 500;
}

.preview-window {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 8px;
  min-height: 300px;
  text-align: center;
}

.preview-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.preview-image {
  max-width: 200px;
  max-height: 200px;
  object-fit: contain;
  border-radius: 4px;
}

.preview-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.preview-info h4 {
  margin: 0;
  color: #1e293b;
  font-size: 0.875rem;
}

.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: #64748b;
}

.preview-placeholder .anticon {
  font-size: 48px;
}

.upload-button {
  width: 100%;
  height: 40px;
  border-radius: 6px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
  transition: all 0.3s ease;
}

.upload-button:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #475569;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.upload-button .anticon {
  font-size: 16px;
  color: #64748b;
}

.upload-button:hover .anticon {
  color: #475569;
}

.upload-hint {
  margin-top: 0.75rem;
  color: #64748b;
  font-size: 0.875rem;
}

.default-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 8px;
  padding: 2rem;
  min-height: 200px;
  text-align: center;
}

.default-photo-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.default-photo .ant-btn-link {
  color: #0ea5e9;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s;
}

.default-photo .ant-btn-link:hover {
  background: rgba(14, 165, 233, 0.1);
}

.selected-clothes {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 6px;
  padding: 1.5rem;
  min-height: 160px;
  text-align: center;
  width: 100%;
  border: 2px dashed #e2e8f0;
}

.selected-clothes-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.selected-clothes-image {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 4px;
}

.selected-clothes-details {
  text-align: center;
}

.selected-clothes-details h4 {
  margin: 0;
  font-size: 0.875rem;
  color: #1e293b;
}

.selected-clothes .ant-btn-link {
  color: #0ea5e9;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.3s;
  margin-top: 0.5rem;
}

.selected-clothes .ant-btn-link:hover {
  background: rgba(14, 165, 233, 0.1);
}

.select-clothes-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: #64748b;
  text-align: center;
}

.select-clothes-prompt svg {
  font-size: 24px;
  color: #94a3b8;
}

/* 控制按钮区域 */
.preview-controls {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* 响应式设计优化 */
@media (max-width: 1400px) {
  .breadcrumb-content,
  .virtual-fitting {
    padding: 0 1.5rem;
  }
}

@media (max-width: 1200px) {
  .virtual-fitting {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 1.25rem;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .breadcrumb {
    margin-top: 60px;
  }

  .breadcrumb-content,
  .virtual-fitting {
    padding: 0 1rem;
  }

  .virtual-fitting {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 1rem auto;
  }
  
  .panel-section {
    min-height: 280px;
  }
  
  .wardrobe-search {
    flex-direction: column;
  }
  
  .wardrobe-search .ant-input-search,
  .wardrobe-search .ant-select {
    width: 100% !important;
  }
  
  .upload-area,
  .default-photo,
  .selected-clothes {
    min-height: 180px;
    padding: 1.5rem;
  }
  
  .preview-window {
    min-height: 250px;
  }
  
  .clothes-item {
    max-width: 160px;
  }
  
  .clothes-image {
    height: 120px;
  }
  
  .default-photo-image {
    width: 100px;
    height: 100px;
  }
  
  .upload-area-container {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .breadcrumb-content {
    padding: 0 1rem;
  }
  
  .virtual-fitting {
    padding: 0.75rem;
  }
  
  .panel-section {
    padding: 1rem;
  }
  
  .preview-controls {
    flex-direction: column;
  }
  
  .preview-controls .ant-btn {
    width: 100%;
  }
  
  .clothes-grid {
    gap: 0.5rem;
  }
  
  .clothes-item {
    max-width: 140px;
  }
  
  .clothes-image {
    height: 100px;
  }
}

.pagination-container {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}

.pagination-container .ant-pagination {
  margin: 0;
}

.pagination-container .ant-pagination-item {
  border-radius: 4px;
}

.pagination-container .ant-pagination-item-active {
  border-color: #0ea5e9;
  background: #0ea5e9;
}

.pagination-container .ant-pagination-item-active a {
  color: white;
}

.pagination-container .ant-pagination-item:hover {
  border-color: #0ea5e9;
}

.pagination-container .ant-pagination-item:hover a {
  color: #0ea5e9;
}

.pagination-container .ant-pagination-options {
  margin-left: 1rem;
}

@media (max-width: 768px) {
  .pagination-container {
    padding: 0.5rem 0;
  }
  
  .pagination-container .ant-pagination-options {
    display: none;
  }
}